export const useWatchScreenResize = (
  cb: () => void,
  immediate: boolean = true
) => {
  if (immediate) {
    cb()
  }

  onMounted(() => {
    window.addEventListener('resize', cb)
  })
  onUnmounted(() => {
    window.removeEventListener('resize', cb)
  })
}
